import ch.swissdotnet.extdirect4j.ExtRemoteAction;
import ch.swissdotnet.extdirect4j.ExtRemoteMethod;
import java.io.PrintStream;

@ExtRemoteAction(name="Action", lazyInit=true)
public class TestAction extends MyExtDirectRouter.AbstractAction
{
  @ExtRemoteMethod
  public Long multy(long a, long b)
  {
    return Long.valueOf(a * b);
  }

  @ExtRemoteMethod(name="multy2")
  public Long multy(int a, long b) {
    return Long.valueOf(a * b);
  }

  @ExtRemoteMethod
  public MyExtDirectRouter.Result multy(long a) {
    return new MyExtDirectRouter.Result(Long.valueOf(a * 2L), "just a result");
  }

  @ExtRemoteMethod
  public String sayHello(String value) {
    return "Hello, " + value;
  }

  @ExtRemoteMethod
  public String getTree(String value) {
    System.out.println("被调到了");
    return "[{'id':10,'leaf':false,'children':[{'id':11,'leaf':true,'children':null,'text':'S600'},{'id':12,'leaf':true,'children':null,'text':'SLK200'}],'text':'Benz'}]";
  }
}